package org.xserver.disruptor.core;

import com.lmax.disruptor.ExceptionHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class DisruptorExceptionHandler implements ExceptionHandler {
    private final Logger logger = LoggerFactory.getLogger(getClass());

    public void handleEventException(Throwable ex, long sequence, Object event) {
        logger.debug("Exception processing: sequence:{},event:{},exception:{}", new Object[]{sequence, event, ex});
    }

    public void handleOnStartException(Throwable ex) {
        logger.debug("Exception:{} during onStart()", ex);
    }

    public void handleOnShutdownException(Throwable ex) {
        logger.debug("Exception:{} during onShutdown()", ex);
    }
}
